﻿using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApp1
{
    class ArrayUtil
    {
        public void Arrjudge()
        {
            Console.WriteLine("数组");
            int[] arr = { 0, 20, 40 };
            int[] arr1 = { };
            foreach (var item in arr1)
            {
                Console.WriteLine(item + " ");
            }
            if (arr1 is null || arr1.Length == 0)
            {
                Console.WriteLine("该数组为空");
            }
            else
            {
                Console.WriteLine("该数组不为空");
            }

            Console.WriteLine("第二个数组");
            foreach (var item in arr)
            {
                Console.Write(item + " ");
            }
            if (arr is null || arr.Length == 0)
            {
                Console.WriteLine("该数组为空");
            }
            else
            {
                Console.WriteLine("该数组不为空");
            }

        }

    }
}
